/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Verito Ramirez
 *         Victor Jaramillo
 */
@Entity
@Table(name = "cxp_tipotransaccion")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CxpTipoTransaccion.findAll", query = "SELECT s FROM CxpTipoTransaccion s"),
    @NamedQuery(name = "CxpTipoTransaccion.findBycxpCodigoTipTra", query = "SELECT s FROM CxpTipoTransaccion s WHERE s.cxpCodigoTipTra = :cxpCodigoTipTra"),
    @NamedQuery(name = "CxpTipoTransaccion.findBycxpNombreTipTra", query = "SELECT s FROM CxpTipoTransaccion s WHERE s.cxpNombreTipTra = :cxpNombreTipTra"),
    @NamedQuery(name = "CxpTipoTransaccion.findBycxpSignoTipTra", query = "SELECT s FROM CxpTipoTransaccion s WHERE s.cxpSignoTipTra = :cxpSignoTipTra")})
public class CxpTipoTransaccion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "CXP_CODIGO_TIPTRA")
    private String cxpCodigoTipTra;
    @Size(max = 45)
    @Column(name = "CXP_NOMBRE_TIPTRA")
    private String cxpNombreTipTra;
    @Size(max = 30)
    @Column(name = "CXP_SIGNO_TIPTRA")
    private String cxpSignoTipTra;
    
    
    public CxpTipoTransaccion() {
    }
    
    public CxpTipoTransaccion(String cxpCodigoTipTra) {
        this.cxpCodigoTipTra = cxpCodigoTipTra;
    }

    public CxpTipoTransaccion(String cxpCodigoTipTra, String cxpNombreTipTra, String cxpSignoTipTra) {
        this.cxpCodigoTipTra = cxpCodigoTipTra;
        this.cxpNombreTipTra = cxpNombreTipTra;
        this.cxpSignoTipTra=cxpSignoTipTra;
    }

    public String getCxpCodigoTipTra() {
        return cxpCodigoTipTra;
    }

    public void setCxpCodigoTipTra(String cxpCodigoTipTra) {
        this.cxpCodigoTipTra = cxpCodigoTipTra;
    }

    public String getCxpNombreTipTra() {
        return cxpNombreTipTra;
    }

    public void setCxpNombreTipTra(String cxpNombreTipTra) {
        this.cxpNombreTipTra = cxpNombreTipTra;
    }

    public String getCxpSignoTipTra() {
        return cxpSignoTipTra;
    }

    public void setCxpSignoTipTra(String cxpSignoTipTra) {
        this.cxpSignoTipTra = cxpSignoTipTra;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cxpCodigoTipTra != null ? cxpCodigoTipTra.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CxpTipoTransaccion)) {
            return false;
        }
        CxpTipoTransaccion other = (CxpTipoTransaccion) object;
        if ((this.cxpCodigoTipTra == null && other.cxpCodigoTipTra != null) || (this.cxpCodigoTipTra != null && !this.cxpCodigoTipTra.equals(other.cxpCodigoTipTra))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.CxpTipoTransaccion[ cxpCodigoTipTra=" + cxpCodigoTipTra + " ]";
    }
    
}
